Subject: Sending
From: "j.valks" <[email-masked]>
To: [email-masked]
Date: Sun, 17 Jul 1994 16:23:06

Hi all,

I'll need your help. I'm writing a program what reads binary(!) data 
from the serial port. This data is send by a PC and can be a program 
, IFF pictures, etc. The size of the data is everytime 80 chars.
What I need is a good way to handle this data. How do I write the 
data to a file ??? I tried this simpele program to test:

If OpenFile(0,"hd0:dm2")
  If OpenFile(1,"ram:test")
    MaxLen buf$=80
    l.l=Lof(0)
    whole.l=l/80
    rest.l=l MOD 80
    MaxLen rest$=rest
    For tel.l=1 To whole
      FileInput 0
      buf$=Edit$(80)
      FileOutput 1
      Print buf$;
    Next tel
    FileInput 0
    rest$=Edit$(rest)
    FileOutput 1
    Print rest$;
    CloseFile 1
    CloseFile 0
  EndIf
EndIf
DefaultOutput
NPrint "Done..."
MouseWait:End

But it doesn't work! the final size is smaller! I think it has 
something to do with the 'strange' ascii characters in the file.

I made the program on the PC side in Visual Basic and it has a 
good file handling because you can choose between several file modes 
in one command. If you use the binary mode, you have to define a 
string variabel as a buffer.

But how do I do this in Blitz!

PLEASE HELP, MAYBE SOMEBODY FROM ACID ???????????????????????

Greetings from:

----------------------------------------------------------------------
Jurgen Valks, working at HTO 's-Hertogenbosch in The Netherlands

Email: [email-masked]

Systems: Amiga 2000, 4Mb, 49Hd working as a fileserver
         Amiga 1200, 6Mb, 120Hd 68030 40Mhz.
         PC 486-DX33, 8mb, 210Hd
         
Working on: Amiga: Hero 2094 (HERO conversion from the CBM64)
                   Blitz2 AmigaGuide file
            PC   : Diropus for PC
            
----------------------------------------------------------------------